#@ucenter_layout()

#define script()
<script>
    function doDelFavorite(id) {
        if (confirm("确定要删除该内容吗？")) {
            ajaxGet("#(CPATH)/ucenter/product/doDelFavorite?id=" + id)
        }
    }
</script>
#end

#define css()
<style>
    strong p {
        display: inline;
    }
</style>
#end

#define content()

    <section class="content">

        <div class="container-fluid">
                <div class="card card-outline card-primary">

                    <!-- /.card-header -->
                    <div class="card-body p-0">

                        <table class="table table-striped">
                            <tbody>
                            <tr>
                                <th style="width: 30%">标题</th>
                                <th>摘要</th>
                                <th style="width: 90px">时间</th>
                            </tr>
                            #for(favorite : page.list ??)
                            <tr>
                                <td>
                                    <strong>
                                        <a href="#(CPATH)#(favorite.link ??)" target="_blank">#(favorite.title
                                            ??)</a>
                                    </strong>
                                    <div class="jp-action-card">
                                        <div class="jp-action-body">
                                            <a href="#(CPATH)#(favorite.link ??)" target="_blank">查看</a> |
                                            <a href="javascript:;" onclick="doDelFavorite('#(favorite.id??)')"
                                               class="red-action">删除</a>
                                        </div>
                                    </div>
                                </td>
                                <td>#(favorite.summary??)</td>
                                <td>#date(favorite.created)</td>
                            </tr>
                            #else
                            <tr class="nodata"><td colspan="999">暂无数据</td> </tr>
                            #end

                            </tbody>
                        </table>
                    </div>

                    <!-- /.card-body -->
                    <div class="card-footer">
                        <div class="row">
                            <div class="col-sm-12">
                                #@_paginate()
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.card -->
            </div>
    </section>
#end
